package org.netty.push.api.exception;

public class BussnessExcetpion extends RuntimeException {

	private static final long serialVersionUID = 3879138084745671430L;
	private ErrorCode errorCode;


	public BussnessExcetpion(ErrorCode errorCode) {
		super(errorCode.getErrorInfo());
		this.errorCode=errorCode;
	}

	public BussnessExcetpion(ErrorCode errorCode, Throwable cause) {
		super( errorCode.getErrorInfo(), cause);
		this.errorCode=errorCode;
	}

	public BussnessExcetpion(Throwable cause) {
		super(cause);
		errorCode=ErrorCode.SYS_ERROR;
	}

	protected BussnessExcetpion(ErrorCode errorCode, Throwable cause, boolean enableSuppression,
			boolean writableStackTrace) {
		super(errorCode.getErrorInfo(), cause, enableSuppression, writableStackTrace);
		this.errorCode=errorCode;
	}

	public ErrorCode getErrorCode() {
		return errorCode;
	}
}
